package com.jincp.image.load;

import android.content.Context;
import android.media.Image;
import android.widget.ImageView;

import com.jincp.image.load.glide_loder.GlideImageLoader;

/**
 * Created by admin on 2017/3/23.
 */

public abstract class ImageLoader {

    private static ImageLoader instance;

    public static ImageLoader getInstance(){
        if (instance == null){
            synchronized (ImageLoader.class) {
                instance = new GlideImageLoader();
            }
        }
        return instance;
    }

    /**
     * 初始化一些必要的配置信息
     * @param context
     */
    public abstract  void init(Context context);

    public abstract <T> void displayImage(T t, ImageView imageView);

    public abstract <T> void displayImage(T t, ImageView imageView, ImageLoaderOptions options);

    public abstract <T> void displayBitmap(T t, ImageView imageView);

    public abstract <T> void displayBitmap(T t, ImageView imageView, ImageLoaderOptions options);

    public  abstract  <T> void displayGif(T t, ImageView imageView);

    public abstract void cleanCache();
}
